home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Java for 3D & VRML Worlds
/
Java for 3d and VRML Worlds.iso
/
multiuser
/
planets
/
main.wrl
< prev
next >
Wrap
Text File
|
1996-09-30
|
10KB
|
400 lines
#VRML V2.0 utf8
# Planets World : Last modified August 8, 1996, for CP Beta 4a
# Concept Design: Yoshinao Kambe <yosh@spiw.com>
# Modeling/Behaviors: Jai Natarajan <jai@spiw.com>
# Textures: Randi Munn
# Christopher Janney <chris@spiw.com>
# Pictures courtesy of NASA
# Music by Sony Music
# Acknowledgements: Bill Owen, JPL
# This document and software is Copyright (C) 1996,
# Sony Pictures Imageworks
PROTO Sony_BindSharedNode [
field SFNode transformNode NULL
field SFNode scriptNode NULL
] {}
WorldInfo { title "planets world"
info "VsServer:spiw.com:7004"
} # connect to multi-user server
Background {
frontUrl ["textures/stars.jpg"]
backUrl ["textures/stars.jpg"]
topUrl ["textures/stars.jpg"]
bottomUrl ["textures/stars.jpg"]
leftUrl ["textures/stars.jpg"]
rightUrl ["textures/stars.jpg"]
}
DEF CAMERA Viewpoint {
position 0 0 50
orientation 0 0 1 0
jump TRUE
}
DEF SUN_TRANS Transform {
translation 0 0 0
children [
DEF SUN_CLICK TouchSensor{}
Shape {
appearance Appearance {
texture ImageTexture { url "textures/sun.gif" }
}
geometry Sphere {radius 5}
}
DEF MERCURY_ORBIT Inline {url "orbits/mercuryorb.wrl"}
DEF VENUS_ORBIT Inline {url "orbits/venusorb.wrl"}
DEF EARTH_ORBIT Inline {url "orbits/earthorb.wrl"}
DEF MARS_ORBIT Inline {url "orbits/marsorb.wrl"}
DEF JUPITER_ORBIT Inline {url "orbits/jupiterorb.wrl"}
DEF SATURN_ORBIT Inline {url "orbits/saturnorb.wrl"}
DEF URANUS_ORBIT Inline {url "orbits/uranusorb.wrl"}
DEF NEPTUNE_ORBIT Inline {url "orbits/neptuneorb.wrl"}
DEF PLUTO_ORBIT Inline {url "orbits/plutoorb.wrl"}
]
} # SUN_TRANS
DEF MERCURY_TRANS Transform {
translation 0 0 0
rotation 0 0 1 0.1
children [
DEF MERCURY_CLICK TouchSensor{}
DEF MERCURY_ROT Transform {
children [
Shape {
appearance Appearance {
texture ImageTexture { url "textures/mercury.jpg" }
}
geometry Sphere {radius 1}
}
]
} #MERCURY_ROT
] # end children
} #MERCURY_TRANS
DEF VENUS_TRANS Transform {
translation 0 0 0
rotation 0 0 1 0.1
children [
DEF VENUS_CLICK TouchSensor{}
DEF VENUS_ROT Transform {
children [
Shape {
appearance Appearance {
texture ImageTexture { url "textures/venus.jpg" }
}
geometry Sphere {radius 2}
}
]
} #VENUS_ROT
] # end children
} # VENUS_TRANS
DEF EARTH_TRANS Transform {
translation 0 0 0
rotation 0 0 1 0.4
children [
DEF EARTH_CLICK TouchSensor{}
DEF EARTH_ROT Transform {
children [
Shape {
appearance Appearance {
texture ImageTexture { url ["textures/earth.gif"] }
}
geometry Sphere {radius 2}
}
]
} #EARTH_ROT
] # end children
} # EARTH_TRANS
DEF MARS_TRANS Transform {
translation 0 0 0
rotation 0 0 1 0.44
children [
DEF MARS_CLICK TouchSensor{}
DEF MARS_ROT Transform {
children [
Shape {
appearance Appearance {
texture ImageTexture { url "textures/mars.jpg" }
}
geometry Sphere {radius 1.5}
}
]
} #MARS_ROT
] # end children
} # MARS_TRANS
DEF COMET_TRANS Transform {
translation 20 0 20
rotation 0 1 0 0
children [
DEF COMET_CLICK TouchSensor{}
Inline {url "comet.wrl" }
]
} # COMET_TRANS
DEF JUPITER_TRANS Transform {
translation 0 0 0
rotation 0 0 1 0.1
children [
DEF JUPITER_CLICK TouchSensor{}
DEF JUPITER_ROT Transform {
children [
Shape {
appearance Appearance {
texture ImageTexture { url ["textures/jupiter.jpg"] }
}
geometry Sphere {radius 4}
}
]
} #JUPITER_ROT
] # end children
} # JUPITER_TRANS
DEF SATURN_TRANS Transform {
translation 0 0 0
rotation 0 0 1 0.44
children [
DEF SATURN_CLICK TouchSensor{}
DEF SATURN_RINGS Shape {
appearance Appearance {
material Material {emissiveColor 0.7 0.7 0.7}
texture ImageTexture { url ["textures/rings.gif"] }
}
geometry Cylinder {
side FALSE
height 0.2
radius 7
}
}
DEF SATURN_ROT Transform {
children [
Shape {
appearance Appearance {
texture ImageTexture { url ["textures/saturn.jpg"] }
}
geometry Sphere {radius 4}
}
]
} #SATURN_ROT
] # end children
} # SATURN_TRANS
DEF URANUS_TRANS Transform {
translation 0 0 0
rotation 0 0 1 1.71
children [
DEF URANUS_CLICK TouchSensor{}
DEF URANUS_ROT Transform {
children [
Shape {
appearance Appearance {
texture ImageTexture {url "textures/uranus.jpg"}
}
geometry Sphere {radius 4}
}
]
} #URANUS_ROT
] # end children
} # URANUS_TRANS
DEF NEPTUNE_TRANS Transform {
translation 0 0 0
rotation 0 0 1 0.49
children [
DEF NEPTUNE_CLICK TouchSensor{}
DEF NEPTUNE_ROT Transform {
children [
Shape {
appearance Appearance {
texture ImageTexture {url "textures/neptune.jpg"}
}
geometry Sphere {radius 3}
}
]
} #NEPTUNE_ROT
] # end children
} # NEPTUNE_TRANS
DEF PLUTO_TRANS Transform {
translation 0 0 0
rotation 0 0 1 2.13
children [
DEF PLUTO_CLICK TouchSensor{}
DEF PLUTO_ROT Transform {
children [
Shape {
appearance Appearance {
texture ImageTexture {url "textures/pluto.jpg"}
}
geometry Sphere {radius 4}
}
]
} #PLUTO_ROT
] # end children
} # PLUTO_TRANS
DEF UNIVERSE_SCRIPT Script {
url "universe.class"
field SFNode camera USE CAMERA
field SFNode self USE SUN_TRANS
field SFNode mercury_trans USE MERCURY_TRANS
field SFNode venus_trans USE VENUS_TRANS
field SFNode earth_trans USE EARTH_TRANS
field SFNode mars_trans USE MARS_TRANS
field SFNode jupiter_trans USE JUPITER_TRANS
field SFNode saturn_trans USE SATURN_TRANS
field SFNode uranus_trans USE URANUS_TRANS
field SFNode neptune_trans USE NEPTUNE_TRANS
field SFNode pluto_trans USE PLUTO_TRANS
field SFNode mercury_rot USE MERCURY_ROT
field SFNode venus_rot USE VENUS_ROT
field SFNode earth_rot USE EARTH_ROT
field SFNode mars_rot USE MARS_ROT
field SFNode jupiter_rot USE JUPITER_ROT
field SFNode saturn_rot USE SATURN_ROT
field SFNode uranus_rot USE URANUS_ROT
field SFNode neptune_rot USE NEPTUNE_ROT
field SFNode pluto_rot USE PLUTO_ROT
field SFNode comet_trans USE COMET_TRANS
eventIn SFTime rotateall
eventIn SFString rpc_request_anomalies
eventIn SFString rpc_create_planets
eventIn SFBool cometclicked
}
DEF ROTATE_TIMER TimeSensor {
loop TRUE
enabled TRUE
cycleInterval 0.1
stopTime -1
}
ROUTE ROTATE_TIMER.cycleTime TO UNIVERSE_SCRIPT.rotateall
ROUTE COMET_CLICK.isActive TO UNIVERSE_SCRIPT.cometclicked
# SOUND LODs CENTERED AT SUN
LOD {
level [
DEF MERCURYSOUND Sound {
intensity 1
minBack 1000
minFront 1000
source DEF MERCURYCLIP AudioClip {
loop TRUE
stopTime -1
startTime 0
url ["music3/mercury3.wav"]
}
}
DEF VENUSSOUND Sound {
intensity 1
minBack 1000
minFront 1000
source DEF VENUSCLIP AudioClip {
loop TRUE
stopTime -1
startTime 0
url ["music3/venus3.wav"]
}
}
DEF MAINSOUND Sound {
intensity 1
minBack 1000
minFront 1000
source DEF MAINCLIP AudioClip {
loop TRUE
stopTime -1
startTime 0
url ["music3/track-83.wav"]
}
}
DEF MARSSOUND Sound {
intensity 1
minBack 1000
minFront 1000
source DEF MARSCLIP AudioClip {
loop TRUE
stopTime -1
startTime 0
url ["music3/mars3.wav"]
}
}
DEF JUPITERSOUND Sound {
intensity 1
minBack 1000
minFront 1000
source DEF JUPITERCLIP AudioClip {
loop TRUE
stopTime -1
startTime 0
url ["music3/jupiter3.wav"]
}
}
DEF SATURNSOUND Sound {
intensity 1
minBack 1000
minFront 1000
source DEF SATURNCLIP AudioClip {
loop TRUE
stopTime -1
startTime 0
url ["music3/saturn3.wav"]
}
}
DEF URANUSSOUND Sound {
intensity 1
minBack 1000
minFront 1000
source DEF URANUSCLIP AudioClip {
loop TRUE
stopTime -1
startTime 0
url ["music3/uranus3.wav"]
}
}
DEF NEPTUNESOUND Sound {
intensity 1
minBack 1000
minFront 1000
source DEF NEPTUNECLIP AudioClip {
loop TRUE
stopTime -1
startTime 0
url ["music3/neptune3.wav"]
}
}
DEF PLUTOSOUND Sound {
intensity 1
minBack 10000
minFront 10000
source DEF PLUTOCLIP AudioClip {
loop TRUE
stopTime -1
startTime 0
url ["music3/neptune3.wav"]
}
}
]
range [ 22 45 59 90 290 532 1062 1670 ]
}
#SHARED NODE TO SYNCHRONIZE ORBITS
Sony_BindSharedNode {
field SFNode transformNode USE SUN_TRANS
field SFNode scriptNode USE UNIVERSE_SCRIPT
}